]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
st/viewport: Remove unused paint volume origin calculations
authorDaniel van Vugt <daniel.van.vugt@canonical.com>
Fri, 7 Jul 2023 09:11:13 +0000 (17:11 +0800)
committerMarge Bot <marge-bot@gnome.org>
Sun, 20 Aug 2023 01:10:44 +0000 (01:10 +0000)
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2828>

src/st/st-viewport.c

index 3f0cdbb463bbb2e932163ce7525be2eab1b3af0d..9086c374d50a1af54aab1f67df3019204280fde6 100644 (file)
@@ -506,7 +506,6 @@ st_viewport_get_paint_volume (ClutterActor       *actor,
   StThemeNode *theme_node = st_widget_get_theme_node (ST_WIDGET (actor));
   ClutterActorBox allocation_box;
   ClutterActorBox content_box;
-  graphene_point3d_t origin;
   double x, y, lower, upper;
 
   /* Setting the paint volume does not make sense when we don't have any allocation */
@@ -524,9 +523,6 @@ st_viewport_get_paint_volume (ClutterActor       *actor,
 
       clutter_actor_get_allocation_box (actor, &allocation_box);
       st_theme_node_get_content_box (theme_node, &allocation_box, &content_box);
-      origin.x = content_box.x1 - allocation_box.x1;
-      origin.y = content_box.y1 - allocation_box.y2;
-      origin.z = 0.f;
 
       if (priv->hadjustment)
         {
@@ -570,6 +566,8 @@ st_viewport_get_paint_volume (ClutterActor       *actor,
   get_border_paint_offsets (viewport, &x, &y);
   if (x != 0 || y != 0)
     {
+      graphene_point3d_t origin;
+
       clutter_paint_volume_get_origin (volume, &origin);
       origin.x += x;
       origin.y += y;